<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRoomsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rooms', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('ID');
            $table->integer('store_id')->index()->nullable()->comment('门店ID');
            $table->string('number', '50')->index()->nullable()->comment('房间号');
            $table->integer('scale_id')->index()->nullable()->comment('房间类型');
            $table->integer('storey_id')->index()->nullable()->comment('房间楼层');
            $table->string('describe', '50')->nullable()->comment('配置描述');
            $table->integer('status')->index()->default(1)->comment('状态：1.正常，2.已预订、3.使用中、4.清扫中、5.维修中');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('rooms');
    }
}
